package jackson.src.day02;

/*
 * Author: JacksonCoder
 * FileName: overStringMethd
 * Version: 1.0.0
 */
public class overStringMethd {
    public static void main(String[] args) {
        String s = "Test string";
        int n1 = s.indexOf('t');                  //从第0个字符开始查找
        int n2 = s.indexOf("st");                 // 从第0个字符开始查找
        int n3 = s.indexOf("st",4);  //从第4个字符开始查找
        System.out.println(n1);
        System.out.println(n2);
        System.out.println(n3);
    }
}
